package com.trkj.dao.hjj;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojo.FunctionType;


public interface IFunctionTypeDAO extends CrudRepository<FunctionType, Long>{
	@Query(nativeQuery = true, value = "select fun_id,function_id,fun_name,(select count(*)  from RELATIONSHIP_111 fr where role_id=?1 and fr.fun_id=f.fun_id) owner from function f where function_id=?2")
	public List<Object[]> findFunctionsByRoleId(long roleId, long typeId);
}
